import request from '@/utils/request'
import { formatDate } from 'element-ui'

export function login(data) {

  var dat = new FormData()
  dat.set("phone", data.phone)
  dat.set("password", data.password)
  // console.log(data)
  return request({
    url: '/user/login',
    method: 'post',
    data: dat
  })
}

export function getInfo(token) {
  return request({
    url: '/user/getInfo',
    method: 'post',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'get'
  })
}
